<?php

/**
 * Cliempre form base class.
 *
 * @method Cliempre getObject() Returns the current form's model object
 *
 * @package    exproaqua
 * @subpackage form
 * @author     Luis Hernández
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
 */
abstract class BaseCliempreForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id_empresa'                => new sfWidgetFormInputText(),
      'agencia'                   => new sfWidgetFormInputText(),
      'codigo'                    => new sfWidgetFormInputHidden(),
      'nombre'                    => new sfWidgetFormInputText(),
      'cedula'                    => new sfWidgetFormInputText(),
      'nrorif'                    => new sfWidgetFormInputText(),
      'nronit'                    => new sfWidgetFormInputText(),
      'referenc1'                 => new sfWidgetFormInputText(),
      'referenc2'                 => new sfWidgetFormInputText(),
      'direccion'                 => new sfWidgetFormInputText(),
      'telefonos'                 => new sfWidgetFormInputText(),
      'telefono_movil'            => new sfWidgetFormInputText(),
      'numerofax'                 => new sfWidgetFormInputText(),
      'fecha'                     => new sfWidgetFormDate(),
      'perscont'                  => new sfWidgetFormInputText(),
      'limite'                    => new sfWidgetFormInputText(),
      'dias'                      => new sfWidgetFormInputText(),
      'precio'                    => new sfWidgetFormInputText(),
      'status'                    => new sfWidgetFormInputText(),
      'nota'                      => new sfWidgetFormTextarea(),
      'credito'                   => new sfWidgetFormInputText(),
      'sector'                    => new sfWidgetFormInputText(),
      'formafis'                  => new sfWidgetFormInputText(),
      'historia'                  => new sfWidgetFormTextarea(),
      'email'                     => new sfWidgetFormInputText(),
      'wwwcli'                    => new sfWidgetFormInputText(),
      'descuento'                 => new sfWidgetFormInputText(),
      'vendedor'                  => new sfWidgetFormInputText(),
      'motsuspend'                => new sfWidgetFormInputText(),
      'flotante'                  => new sfWidgetFormInputText(),
      'tolerancia'                => new sfWidgetFormInputText(),
      'tipo'                      => new sfWidgetFormInputText(),
      'codigocont'                => new sfWidgetFormInputText(),
      'direccobro'                => new sfWidgetFormTextarea(),
      'direcenvio'                => new sfWidgetFormTextarea(),
      'formaenvio'                => new sfWidgetFormInputText(),
      'sexo'                      => new sfWidgetFormInputText(),
      'nacionalidad'              => new sfWidgetFormInputText(),
      'fechanac'                  => new sfWidgetFormDate(),
      'edocivil'                  => new sfWidgetFormInputText(),
      'telhabitacion'             => new sfWidgetFormInputText(),
      'celular'                   => new sfWidgetFormInputText(),
      'anivbodas'                 => new sfWidgetFormInputText(),
      'habcasa'                   => new sfWidgetFormInputText(),
      'habtorre'                  => new sfWidgetFormInputText(),
      'habpiso'                   => new sfWidgetFormInputText(),
      'habapto'                   => new sfWidgetFormInputText(),
      'habcalleav'                => new sfWidgetFormInputText(),
      'haburb'                    => new sfWidgetFormInputText(),
      'trabempresa'               => new sfWidgetFormInputText(),
      'trabcargo'                 => new sfWidgetFormInputText(),
      'trabcasaedif'              => new sfWidgetFormInputText(),
      'trabtorre'                 => new sfWidgetFormInputText(),
      'trabpiso'                  => new sfWidgetFormInputText(),
      'traboficina'               => new sfWidgetFormInputText(),
      'trabcalle'                 => new sfWidgetFormInputText(),
      'traburb'                   => new sfWidgetFormInputText(),
      'trabtelefono'              => new sfWidgetFormInputText(),
      'parentesco1'               => new sfWidgetFormInputText(),
      'parentesco2'               => new sfWidgetFormInputText(),
      'parentesco3'               => new sfWidgetFormInputText(),
      'parentesco4'               => new sfWidgetFormInputText(),
      'parentesco5'               => new sfWidgetFormInputText(),
      'nomapell1'                 => new sfWidgetFormInputText(),
      'nomapell2'                 => new sfWidgetFormInputText(),
      'nomapell3'                 => new sfWidgetFormInputText(),
      'nomapell4'                 => new sfWidgetFormInputText(),
      'nomapell5'                 => new sfWidgetFormInputText(),
      'fechanac1'                 => new sfWidgetFormDate(),
      'fechanac2'                 => new sfWidgetFormDate(),
      'fechanac3'                 => new sfWidgetFormDate(),
      'fechanac4'                 => new sfWidgetFormDate(),
      'fechanac5'                 => new sfWidgetFormDate(),
      'profesion1'                => new sfWidgetFormInputText(),
      'profesion2'                => new sfWidgetFormInputText(),
      'profesion3'                => new sfWidgetFormInputText(),
      'profesion4'                => new sfWidgetFormInputText(),
      'profesion5'                => new sfWidgetFormInputText(),
      'diario'                    => new sfWidgetFormInputText(),
      'emisoraradio'              => new sfWidgetFormInputText(),
      'mediovisto'                => new sfWidgetFormInputText(),
      'sucursal'                  => new sfWidgetFormInputText(),
      'contribespecial'           => new sfWidgetFormInputText(),
      'domiciliado'               => new sfWidgetFormInputText(),
      'excentomora'               => new sfWidgetFormInputText(),
      'moneda'                    => new sfWidgetFormInputText(),
      'campo1'                    => new sfWidgetFormInputText(),
      'campo2'                    => new sfWidgetFormInputText(),
      'campo3'                    => new sfWidgetFormInputText(),
      'campo4'                    => new sfWidgetFormInputText(),
      'campo5'                    => new sfWidgetFormInputText(),
      'codconvenio'               => new sfWidgetFormInputText(),
      'tipopersona'               => new sfWidgetFormInputText(),
      'codban_beneficiario'       => new sfWidgetFormInputText(),
      'codban_intermediario'      => new sfWidgetFormInputText(),
      'nombre_beneficiario'       => new sfWidgetFormInputText(),
      'cuenta_beneficiario'       => new sfWidgetFormInputText(),
      'tipo_cuenta_beneficiario'  => new sfWidgetFormInputText(),
      'codigo_swift_beneficiario' => new sfWidgetFormInputText(),
      'codigo_iban_beneficiario'  => new sfWidgetFormInputText(),
      'nota_cuenta_beneficiario'  => new sfWidgetFormTextarea(),
    ));

    $this->setValidators(array(
      'id_empresa'                => new sfValidatorString(array('max_length' => 6)),
      'agencia'                   => new sfValidatorString(array('max_length' => 3)),
      'codigo'                    => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'codigo', 'required' => false)),
      'nombre'                    => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'cedula'                    => new sfValidatorString(array('max_length' => 14, 'required' => false)),
      'nrorif'                    => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'nronit'                    => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'referenc1'                 => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'referenc2'                 => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'direccion'                 => new sfValidatorString(array('max_length' => 200, 'required' => false)),
      'telefonos'                 => new sfValidatorString(array('max_length' => 30, 'required' => false)),
      'telefono_movil'            => new sfValidatorString(array('max_length' => 100)),
      'numerofax'                 => new sfValidatorString(array('max_length' => 14, 'required' => false)),
      'fecha'                     => new sfValidatorDate(array('required' => false)),
      'perscont'                  => new sfValidatorString(array('max_length' => 50, 'required' => false)),
      'limite'                    => new sfValidatorNumber(array('required' => false)),
      'dias'                      => new sfValidatorNumber(array('required' => false)),
      'precio'                    => new sfValidatorNumber(array('required' => false)),
      'status'                    => new sfValidatorNumber(array('required' => false)),
      'nota'                      => new sfValidatorString(array('required' => false)),
      'credito'                   => new sfValidatorString(array('max_length' => 1, 'required' => false)),
      'sector'                    => new sfValidatorString(array('max_length' => 6, 'required' => false)),
      'formafis'                  => new sfValidatorNumber(array('required' => false)),
      'historia'                  => new sfValidatorString(array('required' => false)),
      'email'                     => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'wwwcli'                    => new sfValidatorString(array('max_length' => 80, 'required' => false)),
      'descuento'                 => new sfValidatorNumber(array('required' => false)),
      'vendedor'                  => new sfValidatorString(array('max_length' => 8, 'required' => false)),
      'motsuspend'                => new sfValidatorString(array('max_length' => 60, 'required' => false)),
      'flotante'                  => new sfValidatorNumber(array('required' => false)),
      'tolerancia'                => new sfValidatorNumber(array('required' => false)),
      'tipo'                      => new sfValidatorString(array('max_length' => 3, 'required' => false)),
      'codigocont'                => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'direccobro'                => new sfValidatorString(array('required' => false)),
      'direcenvio'                => new sfValidatorString(array('required' => false)),
      'formaenvio'                => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'sexo'                      => new sfValidatorNumber(array('required' => false)),
      'nacionalidad'              => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'fechanac'                  => new sfValidatorDate(array('required' => false)),
      'edocivil'                  => new sfValidatorNumber(array('required' => false)),
      'telhabitacion'             => new sfValidatorString(array('max_length' => 60, 'required' => false)),
      'celular'                   => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'anivbodas'                 => new sfValidatorString(array('max_length' => 5, 'required' => false)),
      'habcasa'                   => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'habtorre'                  => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'habpiso'                   => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'habapto'                   => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'habcalleav'                => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'haburb'                    => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'trabempresa'               => new sfValidatorString(array('max_length' => 50, 'required' => false)),
      'trabcargo'                 => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'trabcasaedif'              => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'trabtorre'                 => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'trabpiso'                  => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'traboficina'               => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'trabcalle'                 => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'traburb'                   => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'trabtelefono'              => new sfValidatorString(array('max_length' => 50, 'required' => false)),
      'parentesco1'               => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'parentesco2'               => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'parentesco3'               => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'parentesco4'               => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'parentesco5'               => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'nomapell1'                 => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'nomapell2'                 => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'nomapell3'                 => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'nomapell4'                 => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'nomapell5'                 => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'fechanac1'                 => new sfValidatorDate(array('required' => false)),
      'fechanac2'                 => new sfValidatorDate(array('required' => false)),
      'fechanac3'                 => new sfValidatorDate(array('required' => false)),
      'fechanac4'                 => new sfValidatorDate(array('required' => false)),
      'fechanac5'                 => new sfValidatorDate(array('required' => false)),
      'profesion1'                => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'profesion2'                => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'profesion3'                => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'profesion4'                => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'profesion5'                => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'diario'                    => new sfValidatorString(array('max_length' => 30, 'required' => false)),
      'emisoraradio'              => new sfValidatorString(array('max_length' => 30, 'required' => false)),
      'mediovisto'                => new sfValidatorString(array('max_length' => 30, 'required' => false)),
      'sucursal'                  => new sfValidatorString(array('max_length' => 15, 'required' => false)),
      'contribespecial'           => new sfValidatorNumber(array('required' => false)),
      'domiciliado'               => new sfValidatorNumber(array('required' => false)),
      'excentomora'               => new sfValidatorNumber(array('required' => false)),
      'moneda'                    => new sfValidatorString(array('max_length' => 3, 'required' => false)),
      'campo1'                    => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'campo2'                    => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'campo3'                    => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'campo4'                    => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'campo5'                    => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'codconvenio'               => new sfValidatorString(array('max_length' => 6, 'required' => false)),
      'tipopersona'               => new sfValidatorNumber(array('required' => false)),
      'codban_beneficiario'       => new sfValidatorString(array('max_length' => 3, 'required' => false)),
      'codban_intermediario'      => new sfValidatorString(array('max_length' => 3, 'required' => false)),
      'nombre_beneficiario'       => new sfValidatorString(array('max_length' => 60, 'required' => false)),
      'cuenta_beneficiario'       => new sfValidatorString(array('max_length' => 60, 'required' => false)),
      'tipo_cuenta_beneficiario'  => new sfValidatorString(array('max_length' => 25, 'required' => false)),
      'codigo_swift_beneficiario' => new sfValidatorString(array('max_length' => 25, 'required' => false)),
      'codigo_iban_beneficiario'  => new sfValidatorString(array('max_length' => 25, 'required' => false)),
      'nota_cuenta_beneficiario'  => new sfValidatorString(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('cliempre[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'Cliempre';
  }

}
